package org.ktjiaoyu.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.security.core.GrantedAuthority;

import java.io.Serializable;

/**
权限表对应的实体类
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("tb_permission")
public class Permission implements Serializable, GrantedAuthority {

    /**
    * 权限ID
    */
    @TableId(type = IdType.AUTO)
    @TableField("id")
    private Integer id;
    /**
   * 权限名称*/
   private String name;
    /**
   * 请求地址
   */
   private String url;
    /**
   * 父权限主键
   */
   private Integer parentId;
    /**
    * 权限类型，M菜单，A子菜单，U普通请求
    */
    private String type;
    /**
    * 权限字符串描述，如：user:list,user:add...
    */
    private String permit;
    /**
    * 描述
    */
    private String remark;

    @Override
    public String getAuthority() {
        return "";
    }
}